using Tao.OpenGl;

namespace OhioState.Graphics.OpenGL
{
    public class ClipPlaneGL
    {
        private double[] clip;
        public ClipPlaneGL()
        {
            clip = new double[4];
        }

        public double[] Clip
        {
            get { return clip; }
        }

        public void Enable(int planeNumber)
        {
            Gl.glClipPlane(Gl.GL_CLIP_PLANE0 + planeNumber,  Clip);
            Gl.glEnable(Gl.GL_CLIP_PLANE0 + planeNumber);
        }

        public void Disable(int plane)
        {
            Gl.glDisable(Gl.GL_CLIP_PLANE0 + plane);
        }
    }
}
